package com.qf.api.blog.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.qf.api.blog.dto.ArticleDTO;
import com.qf.api.blog.dto.WikiDTO;
import com.qf.api.blog.entity.WikiEntity;
import com.qf.api.front.vo.WikiVO;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;

import java.util.List;

/**
* @author sin
* @description 针对表【t_wiki(知识库表)】的数据库操作Service
* @createDate 2025-05-23 13:27:40
*/
public interface WikiService extends IService<WikiEntity> {

    boolean addWiki(@Valid WikiDTO wikiDTO);

    boolean checkWikiTitle(String title);

    boolean editWiki(Long id, @Valid WikiDTO wikiDTO);

    WikiDTO getArticleById(Long id);

    boolean updateWikiTopOrPublish(@NotNull Long id, @NotNull Integer type, @NotNull Integer value);

    List<WikiVO> getWikiPage(String title);
}
